﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="left.aspx.cs" Inherits="Admin_left" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script src="js/jquery.js" type="text/javascript"></script>
    <script language="javascript">
        $(function()
        {
            $("[name='content']").hide();
            $("[name='content']:first").show();
            $(".leftPageTitle").not(".split").click(function()
            {
                var id = $(this).attr("id").replace("menuHandler_", "");
                $("[name='content']").not($("#content_" + id)).hide();
                $("#content_" + id).toggle();
            });

            $("#refresh").css({ color: "blue", cursor: "pointer" }).click(function()
            {
                window.location.href = window.location.href;
            });
        });
    </script>
</head>
<body class="LeftBody">
    <form id="form1" runat="server">
    <div>
        <div class="LeftTitle">管理菜单<span id="refresh">(刷新)</span></div>
        <!--功能-->
        <asp:Panel ID="Panel2" runat="server" CssClass="banner" Visible="false">
        当前用户：<asp:Literal ID="Literal1" runat="server"></asp:Literal>
            <asp:Button ID="Button1" runat="server" Text="退出" onclick="Button1_Click" />
        </asp:Panel>
        <!--功能结束-->
        <!--菜单-->
        <asp:Panel ID="Panel1" runat="server" CssClass="leftPage">                
            <asp:Repeater ID="Repeater1" runat="server" 
                onitemdatabound="Repeater1_ItemDataBound">
            <ItemTemplate>
            <ul>            
            <li id='menuHandler_<%# Eval("id") %>' class="leftPageTitle<%# bool.Parse(Eval("IsSplit").ToString())?" split":"" %>"><%# Eval("showtext") %><span class="leftPageTitleIco<%# bool.Parse(Eval("IsSplit").ToString())?" splitico":"" %>">&nbsp;</span></li>
            <li class="leftPageTree" name="content" id='content_<%# Eval("id") %>'><asp:HiddenField ID="MenuID" runat="server" Value='<%# Bind("ID") %>' />
            <asp:TreeView ID="MenuTree" runat="server" SkinID="LeftTree">
            </asp:TreeView> 
            </li>
            </ul>
            </ItemTemplate>
            </asp:Repeater>
        </asp:Panel>
        <!--菜单结束-->
    </div>    
    </form>
</body>
</html>
